import axios from '@/api/common.js'

// 获取所有的商品数据
export const getGoodsAll = (params) => {
  return axios({
    url: 'goods',
    params
  })
}
// 获取分类数据
export const getCategories = (type) => {
  return axios({
    url: 'categories',
    params: { type }
  })
}
export const addCategoriesGoods = (data) => {
  return axios({
    method: 'post',
    url: 'goods',
    data
  })
}
